package com.example.service;

import com.example.mapper.InstructionMapper;
import com.example.pojo.Instruction;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class InstructionServiceImpl implements InstructionService{

    @Autowired
    InstructionMapper instructionMapper;

    //新增指令,对每一个合并、合并更新、拆除操作都需要新增对应的指令
    @Override
    public int newInstruction(Instruction instruction) {
        return instructionMapper.newInstruction(instruction);
    }

    @Override
    public List<Instruction> queryAll() {
        return instructionMapper.queryAll();
    }

    @Override
    public Instruction queryById(int id) {
        return instructionMapper.queryById(id);
    }
}
